--- include/cln/io.h
+++ include/cln/io.h
@@ -16,6 +16,8 @@
   #include <iostream>
 #endif
 
+#include <cstdio>
+
 namespace cln {
 
 // compatibility:
